#ifndef _LY_INF_AREA_H_
#define	_LY_INF_AREA_H_

#include <vector>
#include <map>
#include "DIVA_VM.h"
using namespace std;

//2009/12/14 刪除記錄位置的變數
class Ly_influence_area{
	std::vector<DIVA_VM*> _vms;
	std::multimap<DIVA_VM*, DIVA_VM*> _links;
	void addVMtoRecord(DIVA_VM*);
public:
	Ly_influence_area(DIVA_VM* root, bool bRefIn, bool bRefOut, string valNames, int level);
	Ly_influence_area(){};

	//取得這個VM將牽動的VM們
	std::vector<DIVA_VM*> getVMsLinkedByVM(DIVA_VM*);
	//取得會牽動這個VM的VM們
	std::vector<DIVA_VM*> getVMsLinkToVM(DIVA_VM*);
	inline std::vector<DIVA_VM*> getAllVMs() {	return _vms;}
	inline std::multimap<DIVA_VM*, DIVA_VM*> getLinks() {	return _links;}

	void addRefOutLinksToArea(DIVA_VM* root, string valNames, int level_count);
	void addRefInLinksToArea(DIVA_VM* root, string valNames, int levelUcount);
};

#endif